home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / dep309.zip / DEPARC.EXE / COMSW.ZIP / COMSW.TXT < prev   
Text File  |  1993-09-06  |  12KB  |  324 lines

  1. MANUAL FOR COMSW
  2. ~~~~~~~~~~~~~~~~
  3. (version 0.4a, release date 28 Aug 1993)
  4.  
  5. What is ComSw?
  6. ~~~~~~~~~~~~~
  7.   A DOS utility program which can do three things:
  8.     Report on the settings of the Com ports.
  9.     Alter the settings of the Com ports.
  10.     Act as a simple terminal, mainly intended for debug of some com problems.
  11.  
  12. Computer hardware required
  13. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  14. IBM compatable, DOS 3 or greater, 8088 or greater, standard serial ports 
  15. only, for the monitor function a colour text monitor is recommended.
  16.  
  17. How to use ComSw to report on the status of the ports.
  18. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  19.   Simply run the program without command line parameters. 
  20.   At the DOS prompt just type (without the quotes): 'comsw'
  21.  
  22.   The output of the program can, by using DOS, be redirected to a file or 
  23.   device and here are examples:
  24.   to file         comsw > myfile.rpt
  25.   append to file  comsw >> myfile.rpt
  26.   to device prn   comsw > prn
  27.   to device lpt1  comsw > lpt1
  28.    
  29.   And so on.
  30.   
  31.  
  32. This is what the status output looks like and an explanation follows.
  33.  
  34.        ADR   DOS IRQ_E   BAUD BPS FIFO_ON LOOP DTR RTS CTS DSR RI DCD
  35. COM1: 3F8H  3F8H   4 0   2400 8N1   NO  -   0   0   0   0   0   0   0
  36. COM2: 2F8H  2F8H   3 1   1200 7N1   NO  -   0   1   1   0   0   0   0
  37. COM3: 3E8H  3E8H   4 0   2400 8N1  YES  0   0   0   0   0   0   0   0
  38. COM4: 2E8H  2E8H   3 0   2400 8N1   NO  -   0   0   0   0   0   0   0
  39.   legend: 1=on 0=off -=n/a  dtr/rts are outputs, cts..dcd are inputs
  40.   for help invoke: comsw h
  41.  
  42. ADR
  43. ~~~
  44.   These are the standard I/O address for the com port. ComSw makes no attempt
  45.   to handle non-standard addresses. It looks at whatever device is at this 
  46.   address and reports what it finds. The addresses cannot be altered.
  47.  
  48. DOS
  49. ~~~
  50.   Normally this I/O address will match the setting shown under ADR but DOS 
  51.   maintains a table in RAM of where it has found com ports. There are programs 
  52.   which attempt to hide a port from DOS and if this has been done or no com 
  53.   port was found by DOS on cold boot this field will be shown as 0H.
  54.   ComSw flag 'T' can hide or unhide this field and it ignores what DOS says 
  55.   anyway.
  56.   Invokation to hide com3: comsw /3t0
  57.            to unhide com1: comsw /1t1       
  58.            
  59. IRQ
  60. ~~~
  61.   This is the hardware interrupt number. ComSw assumes standard IRQ numbers 
  62.   and if non standard ones are in use it will cause the program no problems.
  63.   Attempting to auto-detect the true numbers would be very difficult and has 
  64.   not been attempted.
  65.   Note: if as in the example shown there are more than two ports, then as 
  66.   standard the interrupt lines will have to be shared and this CANNOT be done 
  67.   without special software (comms programs etc.)
  68.   This can cause all sorts of bizarre operational bugs in comms software.
  69.   
  70. E
  71. ~
  72.   This is the ENABLE for the UART IRQ hardware interrupt line. As explained 
  73.   under IRQ you must not attempt to share IRQs.
  74.   ComSw can enable or disable this connection.
  75.   Invokation to disable com3: comsw /3e0
  76.               to enable com1: comsw /1e1
  77.   If you have a mouse on com1 and a modem on com3 you will probably find that 
  78.   a comms program for the modem won't work. This might be fixable by disabling 
  79.   com1 and enabling com3 before running the comm program. Unfortunately some 
  80.   of these programs will promptly undo the settings. You may find that 
  81.   shelling to DOS from within the comm program and running comsw will then 
  82.   make things work. Telix is like this. (that is not a criticism of Telix)
  83.   
  84. BAUD
  85. ~~~~
  86.   This should be obvious. ComSw will allow setting of any possible integer 
  87.   (whole number) baud rate. The PC UART can manage between 2 and 115200.
  88.   Invokation to set the baud rate of both com1 and com2 : 
  89.   ComSw /2b9600 /1b110
  90.   
  91. BPS
  92. ~~~
  93.   B is the number of data bits used for the serial link, valid numbers are 5 
  94.   to 8 but only 7 or 8 are generally useful.
  95.   ComSw /4w7
  96.   P is the parity setting for the serial link, ComSw only handles None, Even 
  97.   and Odd. Stick parity has not been implemented.
  98.   n is None, e is Even, o is Odd
  99.   ComSw /2pe  
  100.   S is the number of stop bits used for the serial link, either one or two.
  101.   ComSw /3s1
  102.   
  103.   The following example sets lot's of things on com2: comsw /2s2w7pnb19200
  104.   
  105. FIFO
  106. ~~~~
  107.   Some computers are fitted with an advanced type of UART and ComSw will say 
  108.   whether one is fitted. It is sometimes refered to as a 16550
  109. ON
  110.   This will be marked if a FIFO is present and enabled. ComSw does _not_ test 
  111.   the FIFO. (this is mentioned because there are chips of this type which are 
  112.   defective by design). To test for these defects use a FIFO test program.
  113.   Invokation to turn on a FIFO: ComSw /3f1
  114.  
  115. LOOP
  116. ~~~~
  117.   The UART has internal logic which can be used to test the UART or a comms 
  118.   program. This is called loopback and connects the UART output directly to 
  119.   it's input, CTS to RTS and DTR to DSR.
  120.   You can experiment with this using the monitor facility mentioned later.
  121.   Invokation loopback on: ComSw /1l1
  122.              and all off: ComSw /1l0 /2L0 /3L0 /4l0
  123.   (that's an 'L')
  124.     
  125. DTR
  126. ~~~
  127.   DTR (Data Terminal Ready) is an output from the UART to other equipment and 
  128.   is normally used to tell other equipment that the computer is switched on 
  129.   and ready for work. It is usually controlled by comms software.
  130.   Invokations: ComSw /1d1  ComSw /3d0
  131.   
  132. RTS
  133. ~~~
  134.   RTS (Request To Send) is an output from the UART to other equipment. It is
  135.   normally used as handshaking between the computer and eg. modem and is 
  136.   controlled by the comms software.
  137.   Invokation: ComSw /1r1  ComSw /1r0
  138.   
  139. CTS
  140. ~~~
  141.   CTS (Clear To Send) is an input to the UART from other equipment. ComSw just 
  142.   shows the status of the control line.
  143.  
  144. DSR
  145. ~~~
  146.   DSR (Data Set Ready) is an input to the UART from other equipment. ComSw 
  147.   just shows the status of the control line.
  148.   The word 'dataset' is a name given to a modem or other equipment of that 
  149.   sort. It has the same meaning as DTR (see above) but in the opposite 
  150.   context.
  151.  
  152. RI
  153. ~~
  154.   RI (Ring Indicator) is an input to the UART from other equipment. ComSw just
  155.   shows the status of the control line.
  156.   This line normally waggles when a modem 'hears' the phone ring. 
  157.  
  158. DCD
  159. ~~~
  160.   DCD (Data Carrier Detect) is an input to the UART from other equipment. 
  161.   ComSw just shows the status of the control line.
  162.   It is normally used to indicate when a modem is fully connected to anouther 
  163.   modem.
  164.   
  165. How to get help on the command line switches.
  166. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  167.   Run the program using a help flag:
  168.   comsw /h OR comsw /?
  169.   
  170. Here is the help screen and it is complicated.  
  171.   
  172. ComSw V0.3a (c)1992/3 T N Channon
  173. Usage: comsw {/<flags>}
  174.  Flags are /fbwpsedrlqtmh? but most take numeric args. There may be none or
  175.  more sets of flags separated by spaces. Invoked with no args just displays
  176.  status.
  177.   /<port> where port is 1..4 eg. /3 is flags for COM3
  178.   f0|1 where 0 is disable and 1 is enable FIFO if present
  179.   b<baud> where baud is a number eg. b38400
  180.   w5|6|7|8 number of databits in Word
  181.   pE|O|N Even, Odd or No Parity
  182.   s1|2 One or two stop bits.  L0|1 sets Loopback state.
  183.   e0|1 where 0 is disable and 1 is disable IRQ for port
  184.   d0|1 sets DTR state.  r0|1 sets RTS state
  185.   q    Quiet mode, no display.
  186.   t0|1 Remove or add entry to DOS com port table.
  187.   m    Run monitor program
  188.   h|?  display this text!
  189.  All flags are case insensitive. Errorlevel returned.
  190.  Flags may be in any order and ports may be in any order.
  191.  Example: comsw /1b9600w8pns1e1 /3e0
  192.  
  193.  
  194. Command line flags.
  195. ~~~~~~~~~~~~~~~~~~
  196. /
  197.   Followed by 1 2 3 or 4 indicates to which comm port any immediately 
  198.   following flags apply. There may be one two three or four sets of flags on 
  199.   the command line and they can be in any order, the flags for com4 can 
  200.   preceed the flags for com1.
  201.  
  202. f
  203.   FIFO on or off. f0 or f1
  204.   
  205. b
  206.   Baud rate. Anything valid, ranging from b2 to b115200
  207.  
  208. w
  209.   Bits per word. Anything from w5 to w8
  210.   
  211. p
  212.   Parity. pe po pn  Even Odd or None.
  213.  
  214. s
  215.   Stop bits. s1 or s2
  216.   
  217.   Enable the IRQ. e0 or e1
  218.  
  219.   DTR on or off. d0 or d1
  220.  
  221. r
  222.   RTS on or off. r0 or r1
  223.   
  224. l
  225.   Loopback on or off. L0 or L1
  226.  
  227. q
  228.   Quiet mode. Suppresses text output to the screen.
  229.   Just q
  230.  
  231. t
  232.   Table for DOS. t0 table entry is removed, t1 table entry is inserted if a 
  233.   UART is found at the standard address.
  234.  
  235. m
  236.   Monitor. See below.
  237.  
  238. h
  239. ?
  240.   Invoke help screen.
  241.   
  242. The Terminal or Monitor
  243. ~~~~~~~~~~~~~~~~~~~~~~~
  244.   If a valid command line flag set contains 'm' a monitor will be entered. Any 
  245.   flags which change port settings will be invoked before the monitor is 
  246.   entered.                                         ~~~~~~
  247.   You can monitor one two three or four ports with the screen adjusting 
  248.   accordingly.
  249.   The status of the UART control inputs is shown on a simple moving display. 
  250.   Any incoming characters are displayed and you can send characters from the
  251.   keyboard to any one UART. 
  252.   Some of the UART settings can be altered from the keyboard.
  253.   
  254.   The program is very simple and polls the ports, it is NOT interrupt driven. 
  255.   This method was chosen to avoid disturbing any installed comm driver 
  256.   software which will do nothing because the hardware interrupts are switched 
  257.   off on all ports being monitored.
  258.   
  259.   When you run the monitor TO ACCESS ON LINE HELP JUST PRESS KEY <F1>
  260.   
  261.   The main keyboard does what you would expect, including the control keys and 
  262.   all special ComSw keys use the <alt> key.
  263.   
  264.   <alt>1 keyboard connected to com1
  265.   <alt>2 keyboard connected to com2
  266.   <alt>3 keyboard connected to com3
  267.   <alt>4 keyboard connected to com4
  268.   <alt>5 5 data bits
  269.   <alt>6 6 data bits
  270.   <alt>7 7 data bits
  271.   <alt>8 8 data bits
  272.   
  273.   <alt>D toggle DTR
  274.   <alt>L toggle loopback
  275.   <alt>P toggle parity (rolls none, even, odd)
  276.   <alt>R toggle RTS
  277.   <alt>S toggle number if stop bits
  278.   <alt>X exit monitor program 
  279.   
  280.   <alt><cr> toggle add linefeed to <cr>
  281.   <alt><cursorup> raise baud rate
  282.   <alt><cursordown> lower baud rate
  283.  
  284. Release notes.
  285. ~~~~~~~~~~~~~
  286. V0.4a 
  287. Altered text output to use common ASCII so that redirected output prints and 
  288. displays correctly on simple devices. Now uses '_' '0' and '1'
  289.  
  290. Reports of malfunction in this software (ie. bugs)
  291. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  292. These are welcome and if you find one please take the trouble to tell me.
  293. There are known to be a few computers where the software does not work as 
  294. intended, reason not known. 
  295.  
  296. Conditions of usage.
  297. ~~~~~~~~~~~~~~~~~~~
  298. The program is (c)1992/3 Tim Channon.
  299. All rights reserved. The program may be freely distributed.
  300. The program is not for resale. (you may not sell it)
  301. Only private individuals, registered charities and companies employing less 
  302. than 10 people may use the program without restriction. Others please contact 
  303. the author for a licence in which case the author may at his discretion charge 
  304. a small fee.
  305. Anyone may evaluate the program for a reasonable period.
  306.  
  307. The author disclaims liability for any damage directly or indirectly caused by 
  308. the use of this program the use of which is outside of the authors control.
  309.  
  310. Contact details.
  311. ~~~~~~~~~~~~~~~
  312. The author may be contacted by email:
  313. tchannon@black.demon.co.uk or tchannon@cix.compulink.co.uk
  314.  
  315. Real mail:
  316. Mr T Channon
  317. 25 Stanley Road
  318. Newbury
  319. RG14 7PB
  320. United Kingdom
  321.  
  322. The end is right here ==>